package com.thy.controller;


import com.hospital.common.base.Result;
import com.hospital.common.vo.audit.module.GetAdminVo;
import com.thy.service.TAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 管理员表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-09-30
 */
@RestController
@RequestMapping("/admin")
public class TAdminController {
    @Autowired
    private TAdminService tAdminService;

    /**
     * 判断用户角色
     * @param userId
     * @return
     */
    @GetMapping("/getAdmin")
    public Result<GetAdminVo> getAdmin(@RequestParam("userId") Long userId){
        GetAdminVo getAdminVo = tAdminService.getAdmin(userId);
        return Result.success(getAdminVo);
    }
}
